using System.Diagnostics;
using System.Windows;
using WpfApp3.Controls;
using Yuandl.ThemeUI.Enums;
using Yuandl.ThemeUI.Managers;

namespace WpfApp3
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void TabControl_Closing(object sender, ClosingEventArgs e)
        {
            Debug.WriteLine($"TabControl_Closing: {e.Item.Header}");
        }

        private void TabControl_Closed(object sender, ClosedEventArgs e)
        {
            Debug.WriteLine($"TabControl_Closed: {e.Item.Header}");
        }

        private void TabControl_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            Debug.WriteLine($"TabControl_SelectionChanged: ");
        }
        private void TabControl_Selected(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine($"TabControl_Add: {((WpfApp3.Controls.TabItem)e.Source).Header}");
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {

            ApplicationTheme currentTheme = ApplicationThemeManager.GetAppTheme();

            ApplicationThemeManager.Apply(
                currentTheme == ApplicationTheme.Light ? ApplicationTheme.Dark : ApplicationTheme.Light
            );
        }

    }
}
